<!doctype html>
<html>

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
	<title>svga</title>
	<link rel="stylesheet" type="text/css" href="../css/api.css" />
	<link rel="stylesheet" type="text/css" href="../css/svga.css" />
</head>

<body>
	<div id="svgaCanvas"></div>
	<div id="svgaCanvas_tips"></div>
</body>

</html>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/vue.js"></script>
<script type="text/javascript" src="../script/svga.min.js"></script>
<script type="text/javascript" src="../script/common.js"></script>

<script type="text/javascript">
	apiready = function () {
		var player = new SVGA.Player('#svgaCanvas');
		var parser = new SVGA.Parser('#svgaCanvas');
		$api.text($api.byId('svgaCanvas_tips'), api.pageParam.fromName + '送' + api.pageParam.toName + api.pageParam.GiftName);
		parser.load(api.pageParam.GiftSvga, function (videoItem) {
			player.loops = 1;
			player.setVideoItem(videoItem);
			player.startAnimation();
			player.onFinished(function () {
				api.closeFrame({
					name: 'svga'
				});
			});
		})
	}
</script>